﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace BTv2.UserControls
{
    /// <summary>
    /// Interaction logic for MainSettingsMenu.xaml
    /// </summary>
    public partial class MainSettingsMenu : UserControl
    {
        private Settings _settingsWindow;
        public MainSettingsMenu()
        {
            InitializeComponent();
        }
        public MainSettingsMenu(Settings s)
        {
            InitializeComponent();
            _settingsWindow = s;
        }

        public void EnableAdmin()
        {
            AdminButton.IsEnabled = true;
        }

        private void AdminButton_Clicked(object sender, RoutedEventArgs e)
        {
            _settingsWindow.OpenAdminSettings();
        }

        private void SensorButton_Clicked(object sender, RoutedEventArgs e)
        {
            _settingsWindow.OpenSensorSettings();
        }
        private void SensorGroupsButton_Clicked(object sender, RoutedEventArgs e)
        {
            _settingsWindow.OpenSensorGroupSettings();
        }
        private void RulesButton_Clicked(object sender, RoutedEventArgs e)
        {
            _settingsWindow.OpenRuleSettings();
        }

        private void NotificationsButton_Clicked(object sender, RoutedEventArgs e)
        {
            _settingsWindow.OpenNotificationSettings();
        }
    }
}
